package com.wxzz.elearing.course.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wxzz.elearing.course.entity.StudyPlanCurriculum;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 学习计划对应的课程 Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-03-15
 */
public interface StudyPlanCurriculumMapper extends BaseMapper<StudyPlanCurriculum> {

    //逻辑删除
//    @Update("UPDATE study_plan_curriculum SET deleted = 1 WHERE study_plan_unit_id = #{studyPlanUnitId}")
//    Integer deleteStudyPlanCurriculumByStudyPlanUnitId(Long studyPlanUnitId);

    @Delete("DELETE FROM study_plan_curriculum WHERE study_plan_unit_id = #{studyPlanUnitId}")
    Integer deleteStudyPlanCurriculumByStudyPlanUnitId(Long studyPlanUnitId);
}
